﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Default.Master" AutoEventWireup="true"
    CodeBehind="UserProfile.aspx.cs" Inherits="AUV5.Web.Pages.UserProfile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#aChange").click(function () {
                if ($("[id$=divChange]").is(":hidden")) {
                    $("[id$=divChange]").show();
                    $("[id$=imgbtnSave0]").css("visibility", "hidden");
                }
                else {
                    $("[id$=divChange]").hide();
                    $("[id$=imgbtnSave0]").show().css("visibility", "visible");
                }
            });
        });
    </script>
    <script src="/!js/cutpic/cutpic.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <p class="logintxt">
            <a href="/Pages/UserProfile.aspx">个人信息</a></p>
            <a href="UserBasicInfo.aspx">基本信息</a>|<a href="UserPhoto.aspx">头像</a>|<a href="UserPassword.aspx">密码</a>
        <p class="logintxt">
            &nbsp;</p>
        <div class="userprofile">
            <p class="userprofile_titel">
                以下带 <span class="asterisk_color">*</span> 的项目为必填项</p>
            <div class="userprofile_content">
                <table> 
                    <tr>
                        <td class="style1 style_one style_onecen">
                            真实姓名
                        </td>
                        <td class="style1 style_two">
                            <asp:TextBox ID="txbName" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style_one style_onecen">
                            邮箱
                        </td>
                        <td class="style_two">
                            <asp:TextBox ID="txbEmail" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txbEmail" ValidationGroup="ModifyInfo"
                                ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationExpression="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$"
                                ErrorMessage="邮箱格式不正确" ControlToValidate="txbEmail" 
                                ValidationGroup="ModifyInfo"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style_one style_onetop">
                            <span style="padding: 10px 0 0 0;">自我简介</span>
                        </td>
                        <td>
                            <asp:TextBox ID="txbDescription" runat="server" CssClass="profiletextarea" TextMode="MultiLine"
                                Width="300px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr class="style_two">
                        <td class="style_one style_onetop">
                            地址
                        </td>
                        <td>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <asp:DropDownList ID="ddlProvince" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlProvince_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    省/市
                                    <asp:DropDownList ID="ddlCity" runat="server">
                                    </asp:DropDownList>
                                    市/县<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="ddlCity"
                                       ValidationGroup="ModifyInfo"  ErrorMessage="请选择区域" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                    <br />
                                    <br />
                                    <asp:TextBox ID="txbAddress" runat="server"></asp:TextBox>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                    <tr>
                        <td class="style_one style_onetop">
                            头像
                        </td>
                        <td>
                            
                            <div class="fl avatarbg">
                                <div class="avatarboxbar">
                                    <div id="bgDiv">
                                        <div id="dragDiv">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="avatarthumb">
                                <asp:Image ID="imgCut" ImageUrl="/!images/ef_pic.jpg" runat="server" />
                            </div>
                            <p class="clear">
                            </p>
                            <asp:FileUpload ID="fulImg" runat="server" />
                            <asp:Button ID="btnUploadThumbPic" runat="server" Text="上传" OnClick="btnUploadThumbPic_Click" />
                            <asp:Button ID="btnSure" runat="server" Text="确定" OnClick="btnSure_Click" />
                            <input id="x" runat="server" type="hidden" value="0" />
                            <input id="y" runat="server" type="hidden" value="0" />
                            <input id="maxVal" runat="server" type="hidden" value="300" /><br />
                            <%--<asp:Image ID="imgCut" CssClass="userprofile_picture" ImageUrl="/!images/uploadavatar.jpg"
                                     runat="server" />--%>
                        </td>
                    </tr>
                    <tr>
                        <td class="style_one">
                            <asp:CheckBox ID="ckbReceive" runat="server" Text="接收摘要" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            <asp:ImageButton ID="imgbtnSave0" runat="server" CssClass="userprofile_save" ImageUrl="/!images/btn_saveoff.jpg"
                                onmouseover="MM_swapImage('imgbtnSave0','','/!images/btn_saveon.jpg',6)" onmouseout="MM_swapImgRestore()"
                                alt="保存" ClientIDMode="Static" OnClick="imgbtnSave0_Click" ValidationGroup="ModifyInfo" />
                        </td>
                    </tr>
                </table>
                <p class="passwordtxt">
                    <br />
                    安全起见，请经常<a href="javascript:void(0);" style="color: blue" id="aChange"> 修改密码</a>(注：点击这里，您只可以修改密码，但不包括修改以上个人信息）</p>
                <div runat="server" id="divChange" style="display: inline;">
                    <table>
                        <tr>
                            <td class="style_one style_onecen">
                                请输入登录密码
                            </td>
                            <td>
                                <asp:TextBox ValidationGroup="pwdSave" TextMode="Password" ID="txbOldPwd" runat="server"
                                    CssClass="alter_password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*"
                                    ControlToValidate="txbOldPwd" ValidationGroup="pwdSave"></asp:RequiredFieldValidator>
                                <asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
                        <asp:HiddenField ID="hfIsChange" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style_one style_onecen">
                                请输入新密码
                            </td>
                            <td>
                                <asp:TextBox ValidationGroup="pwdSave" TextMode="Password" ID="txbNewpassord" runat="server"
                                    CssClass="alter_password" MaxLength="20"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                                    ControlToValidate="txbNewpassord" ValidationGroup="pwdSave"></asp:RequiredFieldValidator>
                             <asp:RegularExpressionValidator ID="RegularExpressionValidator2" ValidationGroup="pwdSave" ControlToValidate="txbNewpassord" ValidationExpression="^{6,20}$" runat="server" ErrorMessage="密码长度6-20位">
                               </asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style_one style_onecen">
                                请再输入一次
                            </td>
                            <td>
                                <asp:TextBox ValidationGroup="pwdSave" TextMode="Password" ID="txbRePassword" runat="server"
                                    CssClass="alter_password" MaxLength="20"></asp:TextBox><asp:CompareValidator ID="CompareValidator1"
                                        runat="server" ControlToCompare="txbRePassword" ValidationGroup="pwdSave" ControlToValidate="txbNewpassord"
                                        ErrorMessage="两次密码输入不一致"></asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td>
                                <asp:ImageButton ID="imgbtnSave1" runat="server" CssClass="userprofile_save" ImageUrl="/!images/btn_saveoff.jpg"
                                    onmouseover="MM_swapImage('imgbtnSave1','','/!images/btn_saveon.jpg',6)" onmouseout="MM_swapImgRestore()"
                                    alt="保存" ValidationGroup="pwdSave" ClientIDMode="Static" OnClick="imgbtnSave1_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
</asp:Content>
